﻿<%@ Page Language="C#" AutoEventWireup="false" Inherits="Web.BasePage"%>
<%@ Import Namespace="System.Collections.Generic" %>
<%@ Import Namespace="Web.Controller" %>
<%@ Import Namespace="Domain.Entities" %>
<%@ Import Namespace="MAF.Common" %>
<%@ Import Namespace="Web.UI" %>

<% if( SecurityUI.IsMaintainMode(null) ){ %>
<a href="Part.aspx?Module=<%=Module %>&Handler=User&Action=New" class="btn-add-article">添加用户</a>
<%} %>

<ul>
<% 
    UserHandler h = new UserHandler();
    List<MAF.UserSecurity.User> list = h.Index();

    foreach (MAF.UserSecurity.User info in list)
    {
%>
    <li>
        <input type="checkbox" name="Id" value="<%=info.Id %>" />
        <%= info.Name %>
        <% if( SecurityUI.IsMaintainMode(null) ){ %>
        <a href="Part.aspx?Module=<%=Module %>&Handler=User&Action=Edit&Id=<%=info.Id %>" class="btn-update-article">编辑</a>
        <a href="Part.aspx?Module=<%=Module %>&Handler=User&Action=Delete&Id=<%=info.Id %>" class="btn-delete-article">删除</a>
        <%} %>
    </li>
<% 
    }
%>
</ul>